package com.yswy.app.dto;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

@Data
public class PageVO {

    private Object records;
    private long total;
    private long size;
    private long current;
    private List<T> orders;
    private boolean optimizeCountSql;
    private boolean isSearchCount;

    public PageVO(Page page ,Object records ) {
        this.records = records;
        this.total = page.getTotal();
        this.size = page.getSize();
        this.current = page.getCurrent();
        this.orders = page.getOrders();
        this.optimizeCountSql = page.optimizeCountSql();
        this.isSearchCount = page.isSearchCount();
    }
}
